package com.focusai.efairy.model.request;

import com.focusai.efairy.network.Response;
import com.focusai.efairy.network.exception.ParseException;
import com.focusai.efairy.network.request.base.Request;
import com.focusai.efairy.network.utils.UrlUtils;

import org.json.JSONException;

import java.util.Map;

/**
 * Created by Luogw on 2017/7/26.
 */

public class CheckCodeRequest extends Request<String>{
    private String phone;
    public CheckCodeRequest(String phone,Response.Listener<String> listener) {
        super(Method.GET, UrlUtils.createUrl("/appapi/login_checkcode"), listener);
        this.phone = phone;
    }

    @Override
    public Map<String, String> getParams() throws JSONException {
        addParam("phonenumber",phone);
        return super.getParams();
    }

    @Override
    protected String parse(String result) throws ParseException {
       return result;
    }
}
